import { ref } from 'vue'
export const titleName = ref()
export const changeTitleText = (status: any) => {
  
  
  switch (status) {
    //0:新任务 1:待取货 2:配送中 3:我已送达 4:确认送达 5:我已取货 6:正在购买 7:确认到店
    case 1:
      titleName.value = '确认到店'
      break
    case 3:
      titleName.value = '我已送达'
      break
    case 4:
      titleName.value = '确认送达'
      break
    case 5:
      titleName.value = '确认送达'
      break
    case 6:
      titleName.value = '正在购买'
      break
    case 7:
      titleName.value = '已取货'
      break
    default:
      titleName.value = '待取货'
  }
  return titleName.value
}

const runErrandTitleName = ref<string | null>(null)
// 跑腿
export const runErrandTitleText = (status: any) => {
  
  switch (status) {
    //骑手状态 0:新任务 1:已接单 2:配送中 3:我已送达 4:确认送达 5:我已取货 6:正在购买 7:确认到店
    case 1:
      runErrandTitleName.value = '已接单'
      break
    case 3:
      runErrandTitleName.value = '我已送达'
      break
    case 4:
      runErrandTitleName.value = '确认送达'
      break
    case 5:
      runErrandTitleName.value = '我已取货'
      break
    case 6:
      runErrandTitleName.value = '正在购买'
      break
    case 7:
      runErrandTitleName.value = '确认到店'
      break
    default:
      runErrandTitleName.value = '已接单'
  }
  return runErrandTitleName.value
}
